<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'No reason to believe',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2018/11/23.jpg" alt="The bike path is littered with fallen debris from the trees" class="framed-centred-image" width="649" height="480"/>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<blockquote>
			<p>
				(Note the carot symbol ^ means raise to the power of which we use here becuase (sic) we cannot create the appropriate mathematical symbol in moodle)
			</p>
		</blockquote>
		<p>
			We can&apos;t?
			The appropriate mathematical symbol for exponentiation is superscript, is it not?
			Superscript appears to be working fine for me.
			Our growth rates can be represented as 1000n<sup>3</sup> and 2<sup>n</sup>.
			The carrots are easier to type, and I can certainly see why we might want to use them instead because of that, but to say the classroom software can&apos;t handle it is completely wrong.
		</p>
		<h3>Problem 0</h3>
		<p>
			We&apos;re looking for the point at which algorithm A, with a run time of 1000n<sup>3</sup>, runs quicker than algorithm B, with a run time of 2<sup>n</sup>.
			The easiest way to do that is to find their intersection.
			Once we have the intersection, we can say all values of n greater than that favour A, while all values of n smaller than that favour B.
			With that in mind, all we need to do is set A&apos;s equation equal to B&apos;s equation, then solve for n:
		</p>
		<p>
			1000n<sup>3</sup> = 2<sup>n</sup><br/>
			log<sub>2</sub>(1000n<sup>3</sup>) = n<br/>
			...
		</p>
		<p>
			Well, I&apos;m not sure where to go from there.
			Let&apos;s try working the other side of the problem instead:
		</p>
		<p>
			1000n<sup>3</sup> = 2<sup>n</sup><br/>
			n<sup>3</sup> = (2<sup>n</sup>)/1000<br/>
			n = ∛((2<sup>n</sup>)/1000)<br/>
			...
		</p>
		<p>
			Again, I&apos;m lost.
			I ended up resorting to asking a couple algebra-solvers, but this equation even stumps the machines.
			I don&apos;t think these equations ever cross.
			Let&apos;s take a closer look.
			Algorithm A has a multiplication by one thousand attached to it.
			In order to overcome that, we need 2<sup>n</sup> to become <strong>*far*</strong> greater than n<sup>3</sup>.
			Can 2<sup>n</sup> ever be greater than n<sup>3</sup>?
			Let&apos;s plug in some numbers.
			If n is <code>2</code>, we get that 2<sup>n</sup> is <code>4</code> and n<sup>3</sup> is <code>8</code>.
			If n is <code>3</code>, we get that 2<sup>n</sup> is <code>8</code> and n<sup>3</sup> is <code>27</code>.
			n<sup>3</sup> is growing <strong>*much*</strong> quicker.
			1000n<sup>3</sup> will always have a run time greater than 2<sup>n</sup>.
			A will <strong>*always*</strong> be the inferior algorithm in terms of running time.
			Is there a typo in the discussion question?
		</p>
		<h3>Problem 1</h3>
		<p>
			We are given a code fragment in which there are two nested <code>for()</code> loops.
			The outer loop runs n times, while the inner loop runs a different number of times based on the iteration number of the outer loop.
			For outer iteration zero, the inner loop doesn&apos;t execute at all, while for outer iteration n-1, the inner loop iterates n-1 times.
			If n is less than 2, the run time is effectively zero.
			Otherwise, the run time is n!.
		</p>
		<p>
			I&apos;m new to this &quot;big-Oh&quot; notation.
			Do we write that as &quot;O(xn!)&quot; or &quot;O(n!)&quot;?
		</p>
		<p>
			Anyway, we&apos;re asked to find big-Oh in terms of the upper bound, then asked if we think the lower bound is the same.
			Assuming the content of the inner loop has a constant run time (and in fact, we&apos;re told that it does), then both the upper and lower bound would be O(n!).
			There&apos;s nothing to indicate than this algorithm takes a different amount of time to complete based on its input, aside from the size of the input, denoted by n.
			The &quot;upper bound&quot;, &quot;lower bound&quot;, and &quot;average run time&quot; are just restatements of how long the algorithm always takes to complete.
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2018/{date}.png" alt="{description}" class="framed-centred-image" width="800" height="600"/>
	<p>
		I realised today that I have everything I need to start my new world.
		Specifically, I needed an updated <code>renew</code> mod and a modpack for restoring lost mining stats from past versions of Minetest Game.
		Before I continue work on the bags mod, I want to actually get some play time in.
		For build-planning purposes though, I need a mod to teleport me to the locations I plan to build subway entrances at.
		So I started work on that.
		I got the teleportation thing done, though I&apos;ll want to build in some protection code for the subway locations later.
		The idea is that I&apos;ll set up a second world with the same seed, then teleport to those locations to see which area fits which theme.
		Basically, the themes for the first four entrances will be apple trees, steel, coal, and sandy ruins.
	</p>
	<p>
		Oh.
		Yeah.
		I might want to get an odd mod dealing with sandstone set up before I set up my actual world.
		Otherwise, the sand ruins entrance might just be a large pit with no actual sand to be seen.
	</p>
	<p>
		It looks like I have the following locations to place the entrances at:
	</p>
	<ul>
		<li>
			A sandstone desert
		</li>
		<li>
			A snowy, gravely lake
		</li>
		<li>
			A small sandpit bordering a savannah and a grassland, with a desert nearby
		</li>
		<li>
			An ocean with glaciers near the the entrance site
		</li>
		<p>
			Obviously, the sandstone ruins need to go in the sandstone desert.
			I guess the apple orchard should go in the sandpit.
			There&apos;s grass nearby, and the pit will likely be entirely removed to make room for the orchard anyway, so it&apos;ll look like there was no pit to begin with.
			It&apos;ll just look like a natural spot to put an orchard.
			I&apos;m not sure which of the remaining spots I&apos;ll used for which of the remaining subway entrances though.
		</p>
	</ul>
</section>
<section id="religion">
	<h2>Religion</h2>
	<p>
		I should have read the chapter the missionaries wanted me to read before today, but I guess I&apos;ve been too stressed out for that.
		Maybe yesterday would have been a good time?
		Anyway, I&apos;ll need to have read it by tomorrow morning, so I made sure to read it today.
	</p>
	<p>
		The first paragraph, which I&apos;m pretty sure is an explanation and not a part of the actual holy word of the book, explains that faith is a hope for something that hasn&apos;t been proven to be true.
		Can I Honestly have faith in a god then?
		Can I actually hope for one to exist?
		I mean, if Yahweh does exist and did create everything, he created this terrible world.
		It&apos;s also said that he rejects his children that don&apos;t believe Jesus to be their messiah.
		Can I honestly hope that such a terrible, petty, arbitrary, and unforgiving deity exists and rules over all?
		I don&apos;t think so.
		I&apos;m open-minded, so I&apos;d like to know for sure if there is such a god, but if you convince me that there in fact is, it&apos;s likely a sense of dread I&apos;ll feel.
		Not hope.
	</p>
	<p>
		The next part was about the poor and how they&apos;d been banished from their houses of warship for being impoverished.
		They were considered scum, so they weren&apos;t allowed into the holy buildings.
		It was terrible and unjust.
	</p>
	<p>
		The next part to raise a red flag though was what the main character told the people who wanted proof of Yahweh&apos;s existence.
		He told them that if they had proof, they couldn&apos;t have faith.
		It was for that reason that Yahweh wouldn&apos;t give them any signs.
		Yahweh wanted them to have faith, and there could be no faith where there was true knowledge.
		Wow.
		That&apos;s ... terrible.
		What kind of sheep just goes along with something without evidence?
		Seriously.
		This isn&apos;t a rational way to choose your path in life.
		This is the sort of logic that leads people to gamble away their life savings.
		There&apos;s no proof they&apos;ll win.
		In fact, they probably won&apos;t.
		However, they hope and believe they&apos;ll win anyway, despite all odds, so they take the chance and lose it all.
	</p>
	<p>
		Soon after, it says that the Christian god is merciful to those that believe in his name.
		However, it&apos;s worth noting that most Christians don&apos;t even seem to know his name!
		&quot;God&quot; is not his name any more than &quot;dad&quot; is the name of your dad.
		The Christian god seems to have many names, two of the most commonly-used being &quot;Yahweh&quot; and &quot;Jehovah&quot;.
		It goes on to talk about how when you believe something in your heart and don&apos;t allow doubt to take hold, you&apos;ll begin to believe more and more.
		And with that increased belief will come faith.
		The book continues that because your belief continues to grow, the belief must be a good and correct belief.
		Um.
		Growing belief doesn&apos;t mean that what you believe is true though.
		It only means that you&apos;re stubbornly grasping onto an idea that you have no proof of validity of.
		Again, that&apos;s bad science.
		And then, the book continues that your faith becomes knowledge, and you know the scriptures to be true, and that you have no more faith.
		What?
		That&apos;s not how things work at all.
		This author is either manipulative or certifiable.
	</p>
	<p>
		Again, I prayed about it as the missionaries wanted me to.
		Again though, there is no describable sign.
		However, it looks like there&apos;s not going to be an answer for this sort of thing.
		Assuming the book is right about Yahweh preferring blind faith over actual knowledge, there&apos;s no reason for him to reveal himself to me.
		I won&apos;t ever have any sign.
		Yet if he doesn&apos;t exist, and I highly doubt that he does, he isn&apos;t there to give me a sign.
		There&apos;s no sign either way.
		And no reason to believe.
	</p>
</section>
END
);
